<template>
    <div class="data-center-card">
        <div class="data-center-card-head">
            <div class="data-center-card-head-title">{{ title }}</div>
            <slot name="action" />
        </div>
        <div class="data-center-num">
            <slot name="num"></slot>
        </div>
        <div class="data-center-card-body">
            <slot name="body" />
        </div>
    </div>
</template>

<script setup>
defineProps({
    title: String,
});
</script>

<style lang="scss" scoped>
.data-center-card {
    //min-width: 250px;
    flex: auto;
    background-color: #fbfbfd;
    padding: 1rem;
    border-radius: 4px;
    box-shadow: 1px 1px 20px 2px rgba(#eee, 0.4);
    position: relative;
    &-head {
        display: flex;
        align-items: center;
        justify-content: space-between;

        &-title {
            font-size: 14px;
            font-weight: 500;
            // padding-left: 10px;
            position: relative;
            // &::before{
            //   content: '';
            //   position: absolute;
            //   top: 0;
            //   left: 0;
            //   width: 4px;
            //   height: 100%;
            //   border-radius: 4px;
            //   background-color: #1890ff;
            // }
        }
    }
    .data-center-card-head-num {
        position: absolute;
    }
    .data-center-card-body {
        padding-top: 10px;
        height: 100px;
        width: 100%;
    }
    .data-center-num {
        position: absolute;
        top: 36px;
        font-size: 32px;
        font-weight: 800;
    }
}
</style>
